using System.Windows.Forms;

namespace CloudShot.Editor.Tools
{
  /// <summary>
  ///   Base class for all drawing tools
  /// </summary>
  internal abstract class Tool
  {
    /// <summary>
    ///   Tool cursor.
    /// </summary>
    public abstract Cursor Cursor { get; }

    protected IDrawingCanvas Canvas { get; private set; }

    protected Tool(IDrawingCanvas canvas)
    {
      this.Canvas = canvas;
    }

    /// <summary>
    ///   Left nous button is pressed
    /// </summary>
    /// <param name="e"></param>
    public virtual void OnMouseDown(MouseEventArgs e) {}

    /// <summary>
    ///   Mouse is moved, left mouse button is pressed or none button is pressed
    /// </summary>
    /// <param name="e"></param>
    public virtual void OnMouseMove(MouseEventArgs e) {}

    /// <summary>
    ///   Left mouse button is released
    /// </summary>
    /// <param name="e"></param>
    public virtual void OnMouseUp(MouseEventArgs e) {}

    public virtual void OnKeyDown(KeyEventArgs e) {}

    public virtual void OnKeyUp(KeyEventArgs e) {}

    public virtual void Enter() {}

    public virtual void Leave() {}
  }
}